<div class="empresas index">
	<h2 class="titulo"><?php __('Empresas');?></h2>
	<div class="actions">
		<ul>
			<li><?php echo $html->link(__('Registrar Nueva Empresa', true), array('action' => 'add')); ?></li>
		</ul>
	</div>
	<div class="paging">
		<?php echo $paginator->prev('<< '.__('Anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $paginator->numbers();?>
		<?php echo $paginator->next(__('Siguiente', true).' >>', array(), null, array('class' => 'disabled'));?>
	</div>
	<table cellpadding="0" cellspacing="0">
	<tr>
		<th><?php echo $paginator->sort('nit');?></th>
		<th><?php echo $paginator->sort('nombre');?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($empresas as $empresa):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
		<tr<?php echo $class;?>>
			<td>
				<?php echo $empresa['Empresa']['nit']; ?>
			</td>
			<td>
				<?php echo $empresa['Empresa']['nombre']; ?>
			</td>
			<td class="actions">
				<?php echo $html->link(__('Ver', true), array('action' => 'view', $empresa['Empresa']['id'])); ?>
				<?php echo $html->link(__('Editar', true), array('action' => 'edit', $empresa['Empresa']['id'])); ?>
				<?php echo $html->link(__('Borrar', true), array('action' => 'delete', $empresa['Empresa']['id']), null, sprintf(__('¿Está seguro de borrar el registro "%s"?', true), $empresa['Empresa']['nombre'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('Anterior', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('Siguiente', true).' >>', array(), null, array('class' => 'disabled'));?>
</div>
<p>
<?php
/*echo $paginator->counter(array(
'format' => __('P&aacute;gina %page% de %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));*/
?></p>
